﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
using DAL;
using MODEL;

namespace Service
{
    public class AgricultureService : IAgricultureService
    {
        public async Task<IEnumerable<AgricultureInfo>> QueryAgricultureInfosAsync(AgricultureQueryCriteria criteria)
        {
            IEnumerable<AgricultureInfo> infoList = await AgricultureDAL.QueryAgricultureInfosAsync(criteria);
            return infoList;
            //return infoList.OrderByDescending(info => string.IsNullOrEmpty(infoList.DeadLine) ? DateTime.MinValue : DateTime.Parse(infoList.DeadLine));
        }
    }
}
